package chapterThree.arrays.arraysinheretence;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public   class Car {

 public static void main(String args[]){
	
 List<Object> nn=new ArrayList<Object>();
	
	nn.add(new Object());	
	nn.add(3);
	
	for (Iterator iterator = nn.iterator(); iterator.hasNext();) {
		Object object = (Object) iterator.next();
		System.out.println(object.toString());;
	};
}
 
	
}
